<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>MOON</title>
<link rel="stylesheet" th:href="@{/moon/css/bootstrap.css}" />
<link rel="stylesheet" th:href="@{/icon/css/font-awesome.min.css}" />
<link rel="stylesheet" th:href="@{/upload/css/uploader.css}"/>
</head>
<body class="bg-b">
	<div class="container-fluid" id="app">
		<div class="row">
			<div class="col text-center bg-danger text-white shadow">文件上传</div>
		</div>
		<div class="row mt-2">
			<!-- <form method="post" action="" enctype="multipart/form-data"> -->
				<!-- <input type="file" name="myfile"/> -->
				<!-- <button id="btn-upload" class="btn btn-sm btn-outline-danger" type="submit">上传</button> -->
			<!-- </form> -->
			<div class="col">
				<div>
					<button id="btn-upload" class="btn btn-sm btn-outline-danger">文件上传</button>
				</div>
				<div id="taskbar"></div>
			</div>
		</div>
	</div>
	<!-- js -->
	<script th:src="@{/moon/js/jquery.js}"></script>
	<script th:src="@{/moon/js/vue.js}"></script>
	<script th:src="@{/layer/layer.js}"></script>
	<script th:src="@{/upload/js/uploader.js}"></script>
	<script th:inline="javascript">
		//
		var uploader = new Q.Uploader({
			url : "/upload",
			target : $("#btn-upload")[0],
			view : $("#taskbar")[0],
			upName : "myfile",
			dataType : "text",
			on : {
				complete : function(task) {
					layer.msg(task.response);
				}
			}
		});
	</script>
</body>
</html>